package com.ijiuchuang.jc_localization.contract.tools;

import android.content.Context;

import com.ijiuchuang.jc_localization.base.BasePresenter;
import com.ijiuchuang.jc_localization.base.BaseView;
import com.ijiuchuang.jc_localization.bean.entity.BleDevice;

/**
 * Created by Veev on 2016/7/6
 *
 * @link 384506557@qq.com
 */
public interface ToolsGuardsContract {

    interface View extends BaseView<Presenter> {
        // do in here
        BleDevice getDevice();
        void openBle();
        void setFabIcon(int iconID);
        void setDeviceName(String deviceName);
        void setMac(String mac);
        void setRssiOrigin(String rssiOrigin);
        void setState(String state);
        void setHeartRate(String heartRate);
        void setPower(String power);

        void setCount(String count);
    }

    interface Presenter extends BasePresenter {
        // do in here
        void startScan(BleDevice bleDevice);
        void stopScan();
    }

    interface Model {
        // do in here
        int getBleEnableRes();

        void startScan(Context context, BleDevice bleDevice, GuardsListener listener);
        void stopScan(Context context);

        interface GuardsListener {
            void isSafety(Boolean isSafety);
            void lostCount(int count);
            void rssiUpdate(int rssi);
            void heartRateUpdate(int heartRate);
            void powerUpdate(int power);
        }
    }
}
